﻿using System;

namespace HslCommunication.Core.IMessage
{
	/// <summary>
	/// 旧版的机器人的消息类对象，保留此类为了实现兼容
	/// </summary>
	// Token: 0x02000152 RID: 338
	public class EFORTMessagePrevious : INetMessage
	{
		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ProtocolHeadBytesLength" />
		// Token: 0x170005C7 RID: 1479
		// (get) Token: 0x06001D00 RID: 7424 RVA: 0x0008CF5A File Offset: 0x0008B15A
		public int ProtocolHeadBytesLength
		{
			get
			{
				return 17;
			}
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetContentLengthByHeadBytes" />
		// Token: 0x06001D01 RID: 7425 RVA: 0x0008CF5E File Offset: 0x0008B15E
		public int GetContentLengthByHeadBytes()
		{
			return (int)(BitConverter.ToInt16(this.HeadBytes, 15) - 17);
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.CheckHeadBytesLegal(System.Byte[])" />
		// Token: 0x06001D02 RID: 7426 RVA: 0x0008CF70 File Offset: 0x0008B170
		public bool CheckHeadBytesLegal(byte[] token)
		{
			return this.HeadBytes != null;
		}

		/// <inheritdoc cref="M:HslCommunication.Core.IMessage.INetMessage.GetHeadBytesIdentity" />
		// Token: 0x06001D03 RID: 7427 RVA: 0x00047BE1 File Offset: 0x00045DE1
		public int GetHeadBytesIdentity()
		{
			return 0;
		}

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.EFORTMessagePrevious.HeadBytes" />
		// Token: 0x170005C8 RID: 1480
		// (get) Token: 0x06001D04 RID: 7428 RVA: 0x0008CF7B File Offset: 0x0008B17B
		// (set) Token: 0x06001D05 RID: 7429 RVA: 0x0008CF83 File Offset: 0x0008B183
		public byte[] HeadBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.INetMessage.ContentBytes" />
		// Token: 0x170005C9 RID: 1481
		// (get) Token: 0x06001D06 RID: 7430 RVA: 0x0008CF8C File Offset: 0x0008B18C
		// (set) Token: 0x06001D07 RID: 7431 RVA: 0x0008CF94 File Offset: 0x0008B194
		public byte[] ContentBytes { get; set; }

		/// <inheritdoc cref="P:HslCommunication.Core.IMessage.EFORTMessagePrevious.SendBytes" />
		// Token: 0x170005CA RID: 1482
		// (get) Token: 0x06001D08 RID: 7432 RVA: 0x0008CF9D File Offset: 0x0008B19D
		// (set) Token: 0x06001D09 RID: 7433 RVA: 0x0008CFA5 File Offset: 0x0008B1A5
		public byte[] SendBytes { get; set; }
	}
}
